<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>子类</title>
    <style>
        /* 只选中子类 */
        div>li>p {
            color: aqua;
        }
        li {
            list-style: none;
        }
    </style>
</head>
<body>
    <div>
        <p>这是div里面的p标签</p>
        <li>
            <p>
                这是div里面的li标签里面的p标签
            </p>
        </li>
    </div>
</body>
</html>